﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Drawing;
using System.Windows.Forms;

namespace Mouse_Trapper
{
    class CurrentScreen
    {

      private  int ScreenNum;

   

  
public int CurrentScreenOfPointer(Point MouseCoords, Screen[] Screens)
        {
           
            Screens= Screen.AllScreens;
  
         foreach (Screen Display in Screens)
         {
            
             if (Display.Bounds.X < MouseCoords.X && Display.Bounds.Right > MouseCoords.X)
             {
                 if (Display.Bounds.Y < MouseCoords.Y && Display.Bounds.Bottom > MouseCoords.Y)
                 {
                     return ScreenNum;
                 }
             }
             ScreenNum++;
         }



            return 0;
        }

    }
}
